import AsyncStorage from "@react-native-async-storage/async-storage";

export const setStorage = (key,data)=>{
  return AsyncStorage.setItem(key, JSON.stringify(data))
}

export const getStorage = async (key) => {
  const json = await AsyncStorage.getItem(key)
  if (json){
    return JSON.parse(json)
  }
}